#ifndef INSTANTIATE_H
#define INSTANTIATE_H
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/expand.hpp>
#include <boost/preprocessor/seq/cat.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/for_each_product.hpp>
#include <boost/preprocessor/seq/push_back.hpp>
#include <boost/preprocessor/seq/to_array.hpp>
#include <boost/preprocessor/seq/to_tuple.hpp>
#include <boost/preprocessor/tuple/rem.hpp>
#include <boost/preprocessor/tuple/to_list.hpp>

#define INSTANTIATE_PRODUCT_IMPL(r, product)   \
    BOOST_PP_EXPAND(BOOST_PP_SEQ_HEAD(product) \
                        BOOST_PP_SEQ_TO_TUPLE(BOOST_PP_SEQ_TAIL(product)))
#define INSTANTIATE_PRODUCT(TEMPLATE, PRODUCT) \
    BOOST_PP_SEQ_FOR_EACH_PRODUCT(INSTANTIATE_PRODUCT_IMPL, ((TEMPLATE))PRODUCT)
#endif
